/***JS配置****/
var _serviceURL='/69mark';//必须设置

/*确认弹框*/
$(document).ready(function(){
	$("#form-determine-Id").css('height',$(document).height());
	
	$("#submit_btn").click(function(){
		$('#form-determine-Id').toggle();
	});
	
	/*发手机验证码*/
	$("#btn").click(function(){
		  var userName = $("#userName").val();
		  
		  $.ajax({
			  type : "POST",
				url : _serviceURL+"/toSmsSend.do",
				cache : false,
				data : "userName="+userName,
				dataType : 'json',
				success : function(data) {
					if (data == "1") {

					}else{
						alert('短信发送失败。');
					}
				}
		  })
	  });
});

function submit_form(){
	$("#form").submit();
	$('#form-determine-Id').toggle();
	$("#input_submit").click();
}

function submit_cancel(){
	$("#form-determine-Id").toggle();
}

/**/

function reguster(){
	var userName = $("#userName").val();
	var phone_code = $("#phone_code").val();
	var password = $("#password01").val();
	
	$.ajax({
		  type : "POST",
			url : _serviceURL+"/toRegisterSave.do",
			cache : false,
			data : "userName="+userName+"&phone_code="+phone_code+"&password="+password,
			dataType : 'json',
			success : function(data) {
				if (data == "1") {
					window.location.href=_serviceURL+"/toRegister2.do";
				}else{
					alert('注册失败');
				}
			}
	  })
	
}